<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>13.1. zlib — Compression compatible with gzip &mdash; Python 3.4.3 documentation</title>
    
    <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '3.4.3',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python 3.4.3 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="Python 3.4.3 documentation" href="../index.html" />
    <link rel="up" title="13. Data Compression and Archiving" href="archiving.html" />
    <link rel="next" title="13.2. gzip — Support for gzip files" href="gzip.html" />
    <link rel="prev" title="13. Data Compression and Archiving" href="archiving.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    <script type="text/javascript" src="../_static/copybutton.js"></script>
    <script type="text/javascript" src="../_static/version_switch.js"></script>
    
 

  </head>
  <body>  
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="gzip.html" title="13.2. gzip — Support for gzip files"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="archiving.html" title="13. Data Compression and Archiving"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
        <li>
          <span class="version_switcher_placeholder">3.4.3</span>
          <a href="../index.html">Documentation</a> &raquo;
        </li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li><a href="archiving.html" accesskey="U">13. Data Compression and Archiving</a> &raquo;</li> 
      </ul>
    </div>    

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-zlib">
<span id="zlib-compression-compatible-with-gzip"></span><h1>13.1. <a class="reference internal" href="#module-zlib" title="zlib: Low-level interface to compression and decompression routines compatible with gzip."><tt class="xref py py-mod docutils literal"><span class="pre">zlib</span></tt></a> &#8212; Compression compatible with <strong class="program">gzip</strong><a class="headerlink" href="#module-zlib" title="Permalink to this headline">¶</a></h1>
<p>For applications that require data compression, the functions in this module
allow compression and decompression, using the zlib library. The zlib library
has its own home page at <a class="reference external" href="http://www.zlib.net">http://www.zlib.net</a>.   There are known
incompatibilities between the Python module and versions of the zlib library
earlier than 1.1.3; 1.1.3 has a security vulnerability, so we recommend using
1.1.4 or later.</p>
<p>zlib&#8217;s functions have many options and often need to be used in a particular
order.  This documentation doesn&#8217;t attempt to cover all of the permutations;
consult the zlib manual at <a class="reference external" href="http://www.zlib.net/manual.html">http://www.zlib.net/manual.html</a> for authoritative
information.</p>
<p>For reading and writing <tt class="docutils literal"><span class="pre">.gz</span></tt> files see the <a class="reference internal" href="gzip.html#module-gzip" title="gzip: Interfaces for gzip compression and decompression using file objects."><tt class="xref py py-mod docutils literal"><span class="pre">gzip</span></tt></a> module.</p>
<p>The available exception and functions in this module are:</p>
<dl class="exception">
<dt id="zlib.error">
<em class="property">exception </em><tt class="descclassname">zlib.</tt><tt class="descname">error</tt><a class="headerlink" href="#zlib.error" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception raised on compression and decompression errors.</p>
</dd></dl>

<dl class="function">
<dt id="zlib.adler32">
<tt class="descclassname">zlib.</tt><tt class="descname">adler32</tt><big>(</big><em>data</em><span class="optional">[</span>, <em>value</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#zlib.adler32" title="Permalink to this definition">¶</a></dt>
<dd><p>Computes a Adler-32 checksum of <em>data</em>.  (An Adler-32 checksum is almost as
reliable as a CRC32 but can be computed much more quickly.)  If <em>value</em> is
present, it is used as the starting value of the checksum; otherwise, a fixed
default value is used.  This allows computing a running checksum over the
concatenation of several inputs.  The algorithm is not cryptographically
strong, and should not be used for authentication or digital signatures.  Since
the algorithm is designed for use as a checksum algorithm, it is not suitable
for use as a general hash algorithm.</p>
<p>Always returns an unsigned 32-bit integer.</p>
</dd></dl>

<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">To generate the same numeric value across all Python versions and
platforms use adler32(data) &amp; 0xffffffff.  If you are only using
the checksum in packed binary format this is not necessary as the
return value is the correct 32bit binary representation
regardless of sign.</p>
</div>
<dl class="function">
<dt id="zlib.compress">
<tt class="descclassname">zlib.</tt><tt class="descname">compress</tt><big>(</big><em>data</em><span class="optional">[</span>, <em>level</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#zlib.compress" title="Permalink to this definition">¶</a></dt>
<dd><p>Compresses the bytes in <em>data</em>, returning a bytes object containing compressed data.
<em>level</em> is an integer from <tt class="docutils literal"><span class="pre">0</span></tt> to <tt class="docutils literal"><span class="pre">9</span></tt> controlling the level of compression;
<tt class="docutils literal"><span class="pre">1</span></tt> is fastest and produces the least compression, <tt class="docutils literal"><span class="pre">9</span></tt> is slowest and
produces the most.  <tt class="docutils literal"><span class="pre">0</span></tt> is no compression.  The default value is <tt class="docutils literal"><span class="pre">6</span></tt>.
Raises the <a class="reference internal" href="#zlib.error" title="zlib.error"><tt class="xref py py-exc docutils literal"><span class="pre">error</span></tt></a> exception if any error occurs.</p>
</dd></dl>

<dl class="function">
<dt id="zlib.compressobj">
<tt class="descclassname">zlib.</tt><tt class="descname">compressobj</tt><big>(</big><em>level=-1</em>, <em>method=DEFLATED</em>, <em>wbits=15</em>, <em>memlevel=8</em>, <em>strategy=Z_DEFAULT_STRATEGY</em><span class="optional">[</span>, <em>zdict</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#zlib.compressobj" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a compression object, to be used for compressing data streams that won&#8217;t
fit into memory at once.</p>
<p><em>level</em> is the compression level &#8211; an integer from <tt class="docutils literal"><span class="pre">0</span></tt> to <tt class="docutils literal"><span class="pre">9</span></tt>. A value
of <tt class="docutils literal"><span class="pre">1</span></tt> is fastest and produces the least compression, while a value of
<tt class="docutils literal"><span class="pre">9</span></tt> is slowest and produces the most. <tt class="docutils literal"><span class="pre">0</span></tt> is no compression. The default
value is <tt class="docutils literal"><span class="pre">6</span></tt>.</p>
<p><em>method</em> is the compression algorithm. Currently, the only supported value is
<tt class="docutils literal"><span class="pre">DEFLATED</span></tt>.</p>
<p><em>wbits</em> is the base two logarithm of the size of the window buffer. This
should be an integer from <tt class="docutils literal"><span class="pre">8</span></tt> to <tt class="docutils literal"><span class="pre">15</span></tt>. Higher values give better
compression, but use more memory.</p>
<p><em>memlevel</em> controls the amount of memory used for internal compression state.
Valid values range from <tt class="docutils literal"><span class="pre">1</span></tt> to <tt class="docutils literal"><span class="pre">9</span></tt>. Higher values using more memory,
but are faster and produce smaller output.</p>
<p><em>strategy</em> is used to tune the compression algorithm. Possible values are
<tt class="docutils literal"><span class="pre">Z_DEFAULT_STRATEGY</span></tt>, <tt class="docutils literal"><span class="pre">Z_FILTERED</span></tt>, and <tt class="docutils literal"><span class="pre">Z_HUFFMAN_ONLY</span></tt>.</p>
<p><em>zdict</em> is a predefined compression dictionary. This is a sequence of bytes
(such as a <a class="reference internal" href="functions.html#bytes" title="bytes"><tt class="xref py py-class docutils literal"><span class="pre">bytes</span></tt></a> object) containing subsequences that are expected
to occur frequently in the data that is to be compressed. Those subsequences
that are expected to be most common should come at the end of the dictionary.</p>
<div class="versionchanged">
<p><span class="versionmodified">Changed in version 3.3: </span>Added the <em>zdict</em> parameter and keyword argument support.</p>
</div>
</dd></dl>

<dl class="function">
<dt id="zlib.crc32">
<tt class="descclassname">zlib.</tt><tt class="descname">crc32</tt><big>(</big><em>data</em><span class="optional">[</span>, <em>value</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#zlib.crc32" title="Permalink to this definition">¶</a></dt>
<dd><p id="index-0">Computes a CRC (Cyclic Redundancy Check)  checksum of <em>data</em>. If <em>value</em> is
present, it is used as the starting value of the checksum; otherwise, a fixed
default value is used.  This allows computing a running checksum over the
concatenation of several inputs.  The algorithm is not cryptographically
strong, and should not be used for authentication or digital signatures.  Since
the algorithm is designed for use as a checksum algorithm, it is not suitable
for use as a general hash algorithm.</p>
<p>Always returns an unsigned 32-bit integer.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">To generate the same numeric value across all Python versions and
platforms, use <tt class="docutils literal"><span class="pre">crc32(data)</span> <span class="pre">&amp;</span> <span class="pre">0xffffffff</span></tt>.  If you are only using
the checksum in packed binary format this is not necessary as the
return value is the correct 32-bit binary representation
regardless of sign.</p>
</div>
</dd></dl>

<dl class="function">
<dt id="zlib.decompress">
<tt class="descclassname">zlib.</tt><tt class="descname">decompress</tt><big>(</big><em>data</em><span class="optional">[</span>, <em>wbits</em><span class="optional">[</span>, <em>bufsize</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#zlib.decompress" title="Permalink to this definition">¶</a></dt>
<dd><p>Decompresses the bytes in <em>data</em>, returning a bytes object containing the
uncompressed data.  The <em>wbits</em> parameter controls the size of the window
buffer, and is discussed further below.
If <em>bufsize</em> is given, it is used as the initial size of the output
buffer.  Raises the <a class="reference internal" href="#zlib.error" title="zlib.error"><tt class="xref py py-exc docutils literal"><span class="pre">error</span></tt></a> exception if any error occurs.</p>
<p>The absolute value of <em>wbits</em> is the base two logarithm of the size of the
history buffer (the &#8220;window size&#8221;) used when compressing data.  Its absolute
value should be between 8 and 15 for the most recent versions of the zlib
library, larger values resulting in better compression at the expense of greater
memory usage.  When decompressing a stream, <em>wbits</em> must not be smaller
than the size originally used to compress the stream; using a too-small
value will result in an exception. The default value is therefore the
highest value, 15.  When <em>wbits</em> is negative, the standard
<strong class="program">gzip</strong> header is suppressed.</p>
<p><em>bufsize</em> is the initial size of the buffer used to hold decompressed data.  If
more space is required, the buffer size will be increased as needed, so you
don&#8217;t have to get this value exactly right; tuning it will only save a few calls
to <tt class="xref c c-func docutils literal"><span class="pre">malloc()</span></tt>.  The default size is 16384.</p>
</dd></dl>

<dl class="function">
<dt id="zlib.decompressobj">
<tt class="descclassname">zlib.</tt><tt class="descname">decompressobj</tt><big>(</big><em>wbits=15</em><span class="optional">[</span>, <em>zdict</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#zlib.decompressobj" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a decompression object, to be used for decompressing data streams that
won&#8217;t fit into memory at once.</p>
<p>The <em>wbits</em> parameter controls the size of the window buffer.</p>
<p>The <em>zdict</em> parameter specifies a predefined compression dictionary. If
provided, this must be the same dictionary as was used by the compressor that
produced the data that is to be decompressed.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If <em>zdict</em> is a mutable object (such as a <a class="reference internal" href="functions.html#bytearray" title="bytearray"><tt class="xref py py-class docutils literal"><span class="pre">bytearray</span></tt></a>), you must not
modify its contents between the call to <a class="reference internal" href="#zlib.decompressobj" title="zlib.decompressobj"><tt class="xref py py-func docutils literal"><span class="pre">decompressobj()</span></tt></a> and the first
call to the decompressor&#8217;s <tt class="docutils literal"><span class="pre">decompress()</span></tt> method.</p>
</div>
<div class="versionchanged">
<p><span class="versionmodified">Changed in version 3.3: </span>Added the <em>zdict</em> parameter.</p>
</div>
</dd></dl>

<p>Compression objects support the following methods:</p>
<dl class="method">
<dt id="zlib.Compress.compress">
<tt class="descclassname">Compress.</tt><tt class="descname">compress</tt><big>(</big><em>data</em><big>)</big><a class="headerlink" href="#zlib.Compress.compress" title="Permalink to this definition">¶</a></dt>
<dd><p>Compress <em>data</em>, returning a bytes object containing compressed data for at least
part of the data in <em>data</em>.  This data should be concatenated to the output
produced by any preceding calls to the <a class="reference internal" href="#zlib.compress" title="zlib.compress"><tt class="xref py py-meth docutils literal"><span class="pre">compress()</span></tt></a> method.  Some input may
be kept in internal buffers for later processing.</p>
</dd></dl>

<dl class="method">
<dt id="zlib.Compress.flush">
<tt class="descclassname">Compress.</tt><tt class="descname">flush</tt><big>(</big><span class="optional">[</span><em>mode</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#zlib.Compress.flush" title="Permalink to this definition">¶</a></dt>
<dd><p>All pending input is processed, and a bytes object containing the remaining compressed
output is returned.  <em>mode</em> can be selected from the constants
<tt class="xref py py-const docutils literal"><span class="pre">Z_SYNC_FLUSH</span></tt>,  <tt class="xref py py-const docutils literal"><span class="pre">Z_FULL_FLUSH</span></tt>,  or  <tt class="xref py py-const docutils literal"><span class="pre">Z_FINISH</span></tt>,
defaulting to <tt class="xref py py-const docutils literal"><span class="pre">Z_FINISH</span></tt>.  <tt class="xref py py-const docutils literal"><span class="pre">Z_SYNC_FLUSH</span></tt> and
<tt class="xref py py-const docutils literal"><span class="pre">Z_FULL_FLUSH</span></tt> allow compressing further bytestrings of data, while
<tt class="xref py py-const docutils literal"><span class="pre">Z_FINISH</span></tt> finishes the compressed stream and  prevents compressing any
more data.  After calling <a class="reference internal" href="#zlib.Compress.flush" title="zlib.Compress.flush"><tt class="xref py py-meth docutils literal"><span class="pre">flush()</span></tt></a> with <em>mode</em> set to <tt class="xref py py-const docutils literal"><span class="pre">Z_FINISH</span></tt>,
the <a class="reference internal" href="#zlib.compress" title="zlib.compress"><tt class="xref py py-meth docutils literal"><span class="pre">compress()</span></tt></a> method cannot be called again; the only realistic action is
to delete the object.</p>
</dd></dl>

<dl class="method">
<dt id="zlib.Compress.copy">
<tt class="descclassname">Compress.</tt><tt class="descname">copy</tt><big>(</big><big>)</big><a class="headerlink" href="#zlib.Compress.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a copy of the compression object.  This can be used to efficiently
compress a set of data that share a common initial prefix.</p>
</dd></dl>

<p>Decompression objects support the following methods and attributes:</p>
<dl class="attribute">
<dt id="zlib.Decompress.unused_data">
<tt class="descclassname">Decompress.</tt><tt class="descname">unused_data</tt><a class="headerlink" href="#zlib.Decompress.unused_data" title="Permalink to this definition">¶</a></dt>
<dd><p>A bytes object which contains any bytes past the end of the compressed data. That is,
this remains <tt class="docutils literal"><span class="pre">b&quot;&quot;</span></tt> until the last byte that contains compression data is
available.  If the whole bytestring turned out to contain compressed data, this is
<tt class="docutils literal"><span class="pre">b&quot;&quot;</span></tt>, an empty bytes object.</p>
</dd></dl>

<dl class="attribute">
<dt id="zlib.Decompress.unconsumed_tail">
<tt class="descclassname">Decompress.</tt><tt class="descname">unconsumed_tail</tt><a class="headerlink" href="#zlib.Decompress.unconsumed_tail" title="Permalink to this definition">¶</a></dt>
<dd><p>A bytes object that contains any data that was not consumed by the last
<a class="reference internal" href="#zlib.decompress" title="zlib.decompress"><tt class="xref py py-meth docutils literal"><span class="pre">decompress()</span></tt></a> call because it exceeded the limit for the uncompressed data
buffer.  This data has not yet been seen by the zlib machinery, so you must feed
it (possibly with further data concatenated to it) back to a subsequent
<a class="reference internal" href="#zlib.decompress" title="zlib.decompress"><tt class="xref py py-meth docutils literal"><span class="pre">decompress()</span></tt></a> method call in order to get correct output.</p>
</dd></dl>

<dl class="attribute">
<dt id="zlib.Decompress.eof">
<tt class="descclassname">Decompress.</tt><tt class="descname">eof</tt><a class="headerlink" href="#zlib.Decompress.eof" title="Permalink to this definition">¶</a></dt>
<dd><p>A boolean indicating whether the end of the compressed data stream has been
reached.</p>
<p>This makes it possible to distinguish between a properly-formed compressed
stream, and an incomplete or truncated one.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.3.</span></p>
</div>
</dd></dl>

<dl class="method">
<dt id="zlib.Decompress.decompress">
<tt class="descclassname">Decompress.</tt><tt class="descname">decompress</tt><big>(</big><em>data</em><span class="optional">[</span>, <em>max_length</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#zlib.Decompress.decompress" title="Permalink to this definition">¶</a></dt>
<dd><p>Decompress <em>data</em>, returning a bytes object containing the uncompressed data
corresponding to at least part of the data in <em>string</em>.  This data should be
concatenated to the output produced by any preceding calls to the
<a class="reference internal" href="#zlib.decompress" title="zlib.decompress"><tt class="xref py py-meth docutils literal"><span class="pre">decompress()</span></tt></a> method.  Some of the input data may be preserved in internal
buffers for later processing.</p>
<p>If the optional parameter <em>max_length</em> is supplied then the return value will be
no longer than <em>max_length</em>. This may mean that not all of the compressed input
can be processed; and unconsumed data will be stored in the attribute
<a class="reference internal" href="#zlib.Decompress.unconsumed_tail" title="zlib.Decompress.unconsumed_tail"><tt class="xref py py-attr docutils literal"><span class="pre">unconsumed_tail</span></tt></a>. This bytestring must be passed to a subsequent call to
<a class="reference internal" href="#zlib.decompress" title="zlib.decompress"><tt class="xref py py-meth docutils literal"><span class="pre">decompress()</span></tt></a> if decompression is to continue.  If <em>max_length</em> is not
supplied then the whole input is decompressed, and <a class="reference internal" href="#zlib.Decompress.unconsumed_tail" title="zlib.Decompress.unconsumed_tail"><tt class="xref py py-attr docutils literal"><span class="pre">unconsumed_tail</span></tt></a> is
empty.</p>
</dd></dl>

<dl class="method">
<dt id="zlib.Decompress.flush">
<tt class="descclassname">Decompress.</tt><tt class="descname">flush</tt><big>(</big><span class="optional">[</span><em>length</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#zlib.Decompress.flush" title="Permalink to this definition">¶</a></dt>
<dd><p>All pending input is processed, and a bytes object containing the remaining
uncompressed output is returned.  After calling <a class="reference internal" href="#zlib.Decompress.flush" title="zlib.Decompress.flush"><tt class="xref py py-meth docutils literal"><span class="pre">flush()</span></tt></a>, the
<a class="reference internal" href="#zlib.decompress" title="zlib.decompress"><tt class="xref py py-meth docutils literal"><span class="pre">decompress()</span></tt></a> method cannot be called again; the only realistic action is
to delete the object.</p>
<p>The optional parameter <em>length</em> sets the initial size of the output buffer.</p>
</dd></dl>

<dl class="method">
<dt id="zlib.Decompress.copy">
<tt class="descclassname">Decompress.</tt><tt class="descname">copy</tt><big>(</big><big>)</big><a class="headerlink" href="#zlib.Decompress.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a copy of the decompression object.  This can be used to save the state
of the decompressor midway through the data stream in order to speed up random
seeks into the stream at a future point.</p>
</dd></dl>

<p>Information about the version of the zlib library in use is available through
the following constants:</p>
<dl class="data">
<dt id="zlib.ZLIB_VERSION">
<tt class="descclassname">zlib.</tt><tt class="descname">ZLIB_VERSION</tt><a class="headerlink" href="#zlib.ZLIB_VERSION" title="Permalink to this definition">¶</a></dt>
<dd><p>The version string of the zlib library that was used for building the module.
This may be different from the zlib library actually used at runtime, which
is available as <a class="reference internal" href="#zlib.ZLIB_RUNTIME_VERSION" title="zlib.ZLIB_RUNTIME_VERSION"><tt class="xref py py-const docutils literal"><span class="pre">ZLIB_RUNTIME_VERSION</span></tt></a>.</p>
</dd></dl>

<dl class="data">
<dt id="zlib.ZLIB_RUNTIME_VERSION">
<tt class="descclassname">zlib.</tt><tt class="descname">ZLIB_RUNTIME_VERSION</tt><a class="headerlink" href="#zlib.ZLIB_RUNTIME_VERSION" title="Permalink to this definition">¶</a></dt>
<dd><p>The version string of the zlib library actually loaded by the interpreter.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.3.</span></p>
</div>
</dd></dl>

<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt>Module <a class="reference internal" href="gzip.html#module-gzip" title="gzip: Interfaces for gzip compression and decompression using file objects."><tt class="xref py py-mod docutils literal"><span class="pre">gzip</span></tt></a></dt>
<dd>Reading and writing <strong class="program">gzip</strong>-format files.</dd>
<dt><a class="reference external" href="http://www.zlib.net">http://www.zlib.net</a></dt>
<dd>The zlib library home page.</dd>
<dt><a class="reference external" href="http://www.zlib.net/manual.html">http://www.zlib.net/manual.html</a></dt>
<dd>The zlib manual explains  the semantics and usage of the library&#8217;s many
functions.</dd>
</dl>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="archiving.html"
                        title="previous chapter">13. Data Compression and Archiving</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="gzip.html"
                        title="next chapter">13.2. <tt class="docutils literal"><span class="pre">gzip</span></tt> &#8212; Support for <strong class="program">gzip</strong> files</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
  <li><a href="../bugs.html">Report a Bug</a></li>
  <li><a href="../_sources/library/zlib.txt"
         rel="nofollow">Show Source</a></li>
</ul>

<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>  
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="gzip.html" title="13.2. gzip — Support for gzip files"
             >next</a> |</li>
        <li class="right" >
          <a href="archiving.html" title="13. Data Compression and Archiving"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
        <li>
          <span class="version_switcher_placeholder">3.4.3</span>
          <a href="../index.html">Documentation</a> &raquo;
        </li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li><a href="archiving.html" >13. Data Compression and Archiving</a> &raquo;</li> 
      </ul>
    </div>  
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 1990-2015, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.
    <a href="https://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Feb 26, 2015.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.3.
    </div>

  </body>
</html>